home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
videoutils
/
a-g
/
ami2d
/
test
/
srm3.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1978-11-24
|
1KB
|
77 lines
/* simple solid rocket motor */
options results
if ~show('ports', "AMI2D") then do
address command 'run ami2d:bin/ami2d'
do while ~show('ports', "AMI2D")
end
end
address ami2d
call 'ami2d:rexx/pstrain'
if ~show('l', "rexxmathlib.library") then do
check = addlib('rexxmathlib.library',0,-30,0)
end
pi = 3.141592654
nn = 16
mn = 8
ne = nn/2 - 1
me = mn/2 - 1
b = 6.0
a = 1.0
h = 0.05
E = 1500.0
nu = 0.4900
Ec = 10.0e6
nuc = 0.3000
P = -1000.0
'reset'
'iso(1,'E','nu')'
'iso(2,'Ec','nuc')'
g = 1.5
do i=0 to nn
do j=0 to mn
k = i*40 + j + 1
r = a + (b-a)*pow(i/nn,g)
t = j*pi/(2.0*mn)
x1 = r*sin(t)
y1 = r*cos(t)
'node('k','x1','y1')'
end
end
do i=1 to 2
do j=0 to mn
k = (nn + i)*40 + j + 1
r = b + i*h/2
t = j*pi/(2.0*mn)
x1 = r*sin(t)
y1 = r*cos(t)
'node('k','x1','y1')'
end
end
do i=0 to ne
do j=0 to me
k = i*20 + j + 1
n = i*80 + j*2 + 1
'quad8('k',1,'n','n + 2','n + 82','n + 80','n + 1','n + 42','n + 81','n + 40')'
end
end
i = ne + 1
do j=0 to me
k = i*20 + j + 1
n = i*80 + j*2 + 1
'quad8('k',2,'n','n + 2','n + 82','n + 80','n + 1','n + 42','n + 81','n + 40')'
end
do i=0 to (nn + 2)
'dispx('i*40 + 1',0.0)'
'dispy('i*40 + mn + 1',0.0)'
end
do i=0 to me
'press('i + 1',0,'P')'
end
exit